package com.park.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.park.dao.IntegralRecordMapper;
import com.park.model.IntegralRecord;
import com.park.model.IntegralRecordWeb;
import com.park.service.IntegralRecordService;

@Service
public class IntegralRecordServiceImpl implements IntegralRecordService {

	@Autowired
	private IntegralRecordMapper integralRecordMapper;
	@Override
	public int insert(IntegralRecord integralRecord) {
		return integralRecordMapper.insert(integralRecord);
	}
	@Override
	public List<IntegralRecord> selectIntegralDetail(IntegralRecordWeb integralRecordWeb) {
		// TODO Auto-generated method stub
		integralRecordWeb.setStartPage((integralRecordWeb.getStartPage()-1)*integralRecordWeb.getPageSize());
		return integralRecordMapper.selectIntegralDetail(integralRecordWeb);
	}
	@Override
	public int selectAllCount(IntegralRecordWeb integralRecordWeb) {
		// TODO Auto-generated method stub
		return integralRecordMapper.selectAllCount(integralRecordWeb);
	}
}
